
// #ifndef VUE3
import Vue from 'vue'
import App from './App'
import store from './store' // store
import plugins from './plugins' // plugins
import './permission' // permission
import config from '@/config'

import uView from "uview-ui";
import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "./common/ruoyi.js";
Vue.use(plugins)
Vue.use(uView);
// 配置全局样式单位，设置rpx为750模式
Vue.prototype.$u.config.unit = 'rpx';
// 在main.js中配置
Vue.prototype.$u.config.toast = {
    duration: 2000  // 设置全局默认的toast显示时间为5000毫秒
};
import cuCustom from './colorui/components/cu-custom.vue'
Vue.component('cu-custom',cuCustom)
//自定义控件---主界面
import cuHome from './pages/home/home.vue'
Vue.component('cu-home',cuHome)
//自定义控件---工作台
import cuWork from './pages/work/work.vue'
Vue.component('cu-work',cuWork)
//自定义控件---我的
import cuMine from './pages/mine/mine.vue'
Vue.component('cu-mine',cuMine)

//自定义控件---顶部轮播图
import pagesTop from './components/pagesTop/pagesTop.vue'
Vue.component('pagesTop',pagesTop)
//自定义控件---服务卡片图
import pagesServiceCard from './components/pagesServiceCard/pagesServiceCard.vue'
Vue.component('pagesServiceCard',pagesServiceCard)
import VueDraggable from '@/common/vuedraggable/src/vuedraggable'  
Vue.component('draggable', VueDraggable)
//自定义控件---搜索组件
import searchBox from './components/searchBox/searchBox.vue'
Vue.component('searchBox',searchBox)
// #ifdef H5
import wechat from '@/utils/wechat';
import wxH5Login from '@/utils/wxH5Login';
Vue.prototype.$wx = wechat;
Vue.prototype.$wxH5Login = wxH5Login;
// #endif
Vue.config.productionTip = false
// 全局方法挂载
Vue.prototype.$store = store
Vue.prototype.parseTime = parseTime
Vue.prototype.resetForm = resetForm
Vue.prototype.addDateRange = addDateRange
Vue.prototype.selectDictLabel = selectDictLabel
Vue.prototype.selectDictLabels = selectDictLabels
Vue.prototype.handleTree = handleTree
Vue.prototype.getBaseUrl = config.baseUrl  // 获取基础地址
Vue.prototype.imageServiceURL=config.imageServiceURL//图片地址
App.mpType = 'app'

const app = new Vue({
    ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
// import App from './App.vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif